package com.google.gwt.sample.dynatablerf.server.dao;

import java.util.List;

import com.google.gwt.sample.dynatablerf.server.domain.AbstractEntity;
import com.google.gwt.sample.dynatablerf.server.domain.AbstractEntityQueryParams;


public interface IDAOManager<T extends AbstractEntity, G extends AbstractEntityQueryParams> {

	T persist(T entity);
	
	T findById(Long id);
	
	T find(G params);
	
	List<T> findAll(int startIndex, int maxResult);

	List<T> findAll(G params, int startIndex, int maxResult);
	
	Long count(G params);
	
	Long countAll();

	List<T> findSuggestions(String suggestQuery, G params, int maxResult);
	
	G getEmptyParams();
}
